<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:th="http://www.thymeleaf.org"
      xmlns:shiro="http://www.thymeleaf.org/thymeleaf-extras-shiro">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
    <title th:text="${msg}"></title>
    <link rel="stylesheet" href="../../static/layui/css/layui.css" th:href="@{https://cdn.staticfile.org/layui/2.7.6/css/layui.css}">
    <script src="../../static/layui/jquery-3.4.1.min.js" th:src="@{https://cdn.bootcss.com/jquery/3.4.1/jquery.js}"></script>
    <script src="../../static/layui/layui.js" th:src="@{https://cdn.staticfile.org/layui/2.7.6/layui.js}"></script>
    <script src="../../static/layer/layer.js" th:src="@{https://cdn.staticfile.org/layer/3.5.1/layer.js}"></script>
</head>
<body>
    <p th:text="${msg}" style="color: red;">
    </p>
    <p>
        <a th:href="@{/toLogin}">登录</a>
    </p>
    <p>
        <a th:href="@{/basic/login/logOut}">退出登录</a>
    </p>
    <p th:if="${session.loginUser != null}">
        <p th:text="${session.loginUser?.nickname}">
        </p>
        <p th:if="${session.loginUser?.power eq 'admin' || session.loginUser?.power eq 'user'}">
            <a th:href="@{/toArea}">区块</a>
        </p>
        <p th:if="${session.loginUser?.power eq 'admin' || session.loginUser?.power eq 'area'}">
            <a th:href="@{/toUser}">用户</a>
        </p>
    </p>
    <form th:action="@{/basic/login/toSignin}" th:method="POST">
        <div>
            <div class="layui-form-item">
                <div class="layui-input-inline">
                    用户名：<input type="text" id="username" name="username" required lay-verify="required" placeholder="请输入用户名"  class="layui-input">
                </div>
                <div class="layui-input-inline">
                    密码：<input type="password" id="password" name="password" required lay-verify="required" placeholder="请输入密码"  class="layui-input">
                </div>
            </div>
            <div class="layui-form-item">
                <div class="layui-input-block">
                    <button class="layui-btn"  lay-submit lay-filter="formDemo">立即提交</button>
                    <button type="reset" class="layui-btn layui-btn-primary">重置</button>
                </div>
            </div>
        </div>
    </form>
</body>
</html>